home *** CD-ROM | disk | FTP | other *** search
-
- ; -------------------------------------------------------------
- ; Simple file-reading example, with crude string parsing...
- ; -------------------------------------------------------------
- ; Uncommented version, to show how simple the code really is...
-
- Graphics 640, 480
-
- Color 150, 150, 200
- Print
- Print "Reading text from 'test.txt'..."
-
- Color 255, 255, 255
-
- info = ReadFile ("test.txt")
-
- If info
- Repeat
- a$ = ReadLine (info)
- Print a$
- Until Eof (info)
- CloseFile info
- Else
- RuntimeError "Failed to read test.txt! Aborting..."
- EndIf
-
- MouseWait
- End